#include "Renderer.h"

Renderer::Renderer(void)
{
}

Renderer::~Renderer(void)
{
}

void Renderer::initialize()
{
	// The default clear color is black.
	setClearColor(0.0f, 0.0f, 0.0f);
	// The default clear depth is 1.
	setClearDepth(1.0f);
}

void Renderer::cleanup()
{
}

void Renderer::display()
{
	clear();


	swapBuffers();
}

void Renderer::clear()
{
	// Clears the color and depth buffers to the predefined color and depth.
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}

void Renderer::swapBuffers()
{
	// Swaps the buffers, displaying what has been rendered.
	glfwSwapBuffers();
}

void Renderer::setClearColor(float r, float g, float b)
{
	// Sets the clear color.
	glClearColor(r, g, b, 1.0f);
}

void Renderer::setClearDepth(float d)
{
	// Sets the clear depth.
	glClearDepth(d);
}